<tc_include file="Public:header" />
  <div id="content-container" class="container">
      <div class="row row-3-9">
        <div class="col-md-6 col-md-offset-3">	
          <div class="panel panel-default panel-col">
	        <div class="panel-heading">报名信息</div>
	           <div class="panel-body">
			     <form id="user-profile-form" class="form-horizontal js-ajax-form" method="post" name="myform" action="{:U('Exam/Baoming/add_post')}">
					<div class="form-group">
						<label class="col-md-2 control-label" for="profile_truename">报名类别</label>
						<div class="col-md-7 controls radios">
							<select id='first'  name="top_id" class="form-control" required="required">       
								<option>==请选择==</option>  
								<foreach name="type" item="vo">
									<option  value="{$vo['term_id']}">{$vo['name']}</option>       
								</foreach>
						    </select>        
						</div> 
            		</div>
					<div class="form-group" id="gread">
						<label class="col-md-2 control-label" for="profile_truename">报名年级</label>
						<div class="col-md-7 controls radios">
							<select id="label"  name="type_id" class="form-control">       
								<option>==请选择==</option>       
							</select>    
						</div> 
            		</div>
					<div class="form-group">
						<label class="col-md-2 control-label" for="profile_truename">真实姓名</label>
						<div class="col-md-7 controls radios">
							<input type="text"  name="username" class="form-control" required="required" value="{$user['username']}">
							<div class="help-block" style="display:none;"></div>
						</div> 
            		</div>
					<div class="form-group">
						<label class="col-md-2 control-label">性&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp别</label>
						<div class="col-md-7 controls radios">
							<div id="profile_gender">
								<input type="radio" id="profile_gender_0" name="sex" required="required" value="1" {$man}>
								<label for="profile_gender_0" class="required">男</label>
								<input type="radio" id="profile_gender_1" name="sex" required="required" value="2" {$woman} >
								<label for="profile_gender_1" class="required">女</label>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label for="profile_mobile" class="col-md-2 control-label">手机号码</label>
						<div class="col-md-7 controls">
							<input type="text" id="profile_weixin" name="mobilephone" required="required" class="form-control">
							<div class="help-block" style="display:none;"></div>
						</div>
					</div>
					<div class="form-group">
						<label class="col-md-2 control-label">固定电话</label>
						<div class="col-md-7 controls">
							<input type="text" id="profile_weixin" name="fixedphone" required="required" class="form-control" >
							<div class="help-block" style="display:none;"></div>
						</div>
					</div>
					<div class="form-group">
						<label class="col-md-2 control-label">身份证号</label>
						<div class="col-md-7 controls">
							<input type="text" id="profile_weixin" name="idnumber" required="required" class="form-control">
							<div class="help-block" style="display:none;"></div>
						</div>
					</div>
					<div class="form-group">
						<label for="profile_qq" class="col-md-2 control-label">Q Q 号码</label>
						<div class="col-md-7 controls">
							<input type="text" id="profile_qq" name="qq" required="required" class="form-control">
							<div class="help-block" style="display:none;"></div>
						</div>
					</div>
					<div class="form-group">
						<label class="col-md-2 control-label">家长姓名</label>
						<div class="col-md-7 controls">
							<input type="text" id="profile_weixin" name="patriarchal" required="required" class="form-control" >
							<div class="help-block" style="display:none;"></div>
						</div>
					</div>
					<div class="form-group">
						<label class="col-md-2 control-label">家长电话</label>
						<div class="col-md-7 controls">
							<input type="text" id="profile_weixin" name="patriarchalphone" required="required" class="form-control" >
							<div class="help-block" style="display:none;"></div>
						</div>
					</div>
					<div class="row">
						<div class="col-md-7 col-md-offset-2">
							<button id="profile-save-btn"  type="submit" class="btn btn-primary js-ajax-submit">保存</button>
						</div>
					</div>
			    </form>
		       </div>
	         </div>
          </div>
     </div>
  </div>
 <tc_include file="Public:scripts" />

<script language="javascript"> 
	$(function(){ 
	$("#gread").hide();
	$("#first").change(function(){  
	var parentId=$("#first").val(); 
	if(null!= parentId && ""!=parentId){
	$.getJSON("{:U('Exam/Baoming/getsontype')}",{id:parentId},function(myJSON){
	var options=""; 
	if(myJSON.length>0){ 
	options+="<option value='-1'>==请选择标签==</option>"; 
	for(var i=0;i<myJSON.length;i++){ 
		options+="<option value="+myJSON[i].term_id+">"+myJSON[i].name+"</option>"; 
	} 
	$("#label").html(options); 
	$("#gread").show(); 
	} 
	else if(myJSON.length<=0){ 
	$("#gread").hide();
	} 
	}); 
	} 
	else{ 
	$("#gread").hide();
	} 
	}); 
	}); 
</script>
<tc_include file="Public:footer" />